package com.star.batchhandler.demo;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;

import javax.sql.DataSource;

import com.star.platform.transaction.inter.ITransactionService;

public class SQLOperation {

	final static ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(15);

	public SQLOperation(DataSource ds, ITransactionService tx) throws Exception {
		for (int i = 0; i < 500; i++) {
			for (int j = 0; j < 20; j++) {
				scheduler.execute(new TransactionJob(ds,tx));
			}
//			Thread.sleep(100);
		}
	}

	public static void main(String[] args) {
	}
}
